#pragma once

using namespace System::Collections::Generic;
using namespace Tigera::T_Definition;
using namespace Tigera::Network;
using namespace Tigera::LibCodeUtils;
#include "ErrorType.h"

ref class CMQNetServer
{
public:
	
	void OnMessaged(System::Object^ sender, MessageEventArgs^ eventargs);	
	//void OnErrored(System::Object^ sender, Tigera::LibCommon::TiEventArgs<Tigera::LibCommon::Tuple<Tigera::Network::NetError^, System::String^, System::Exception^, Tigera::Network::MQSession^> eventargs);

	bool Start();
	void Stop();
	static CMQNetServer^ Instance();


	bool publishErrorMsg(const ErrorInfo& msg);
	
private:
	static CMQNetServer^ instance = gcnew CMQNetServer();
	CMQNetServer(void);
	MQConnection^ m_conn;

	ResponseTodayBusinessRecordQuery^ GetDealedOrder();
	ResponseAccountPositionQuery^ GetPostionInfos();
};
